summaryrefslogtreecommitdiffstats
path: root/SetFlags.cmake
diff options
context:
space:
mode:
authorCengiz Can <cengizc@gmail.com>2015-06-02 00:26:57 +0200
committerCengiz Can <cengizc@gmail.com>2015-06-04 10:48:56 +0200
commitc967698b2de6a0c588dbf0cebc493dbb03989333 (patch)
tree90ed066862c081299e02b173b9de99643e7e5732 /SetFlags.cmake
parentMerge pull request #2202 from mc-server/CmakeCleanup (diff)
downloadcuberite-c967698b2de6a0c588dbf0cebc493dbb03989333.tar
cuberite-c967698b2de6a0c588dbf0cebc493dbb03989333.tar.gz
cuberite-c967698b2de6a0c588dbf0cebc493dbb03989333.tar.bz2
cuberite-c967698b2de6a0c588dbf0cebc493dbb03989333.tar.lz
cuberite-c967698b2de6a0c588dbf0cebc493dbb03989333.tar.xz
cuberite-c967698b2de6a0c588dbf0cebc493dbb03989333.tar.zst
cuberite-c967698b2de6a0c588dbf0cebc493dbb03989333.zip
Diffstat (limited to 'SetFlags.cmake')
-rw-r--r--SetFlags.cmake12
1 files changed, 7 insertions, 5 deletions
diff --git a/SetFlags.cmake b/SetFlags.cmake
index b79551eef..57cab5a1c 100644
--- a/SetFlags.cmake
+++ b/SetFlags.cmake
@@ -63,7 +63,7 @@ macro(set_flags)
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG")
elseif(APPLE)
-
+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
@@ -262,8 +262,11 @@ macro(set_exe_flags)
add_flags_cxx("-Wno-documentation")
endif()
if ("${CLANG_VERSION}" VERSION_GREATER 3.5)
- # Use this flag to ignore error for a reserved macro problem in sqlite 3
- add_flags_cxx("-Wno-reserved-id-macro")
+ check_cxx_compiler_flag(-Wno-reserved-id-macro HAS_NO_RESERVED_ID_MACRO)
+ if (HAS_NO_RESERVED_ID_MACRO)
+ # Use this flag to ignore error for a reserved macro problem in sqlite 3
+ add_flags_cxx("-Wno-reserved-id-macro")
+ endif()
endif()
endif()
endif()
@@ -277,7 +280,7 @@ endmacro()
# set_source_files_properties(${FILENAME} PROPERTIES COMPILE_FLAGS "-Wno-error=missing-prototypes -Wno-error=deprecated")
# set_source_files_properties(${FILENAME} PROPERTIES COMPILE_FLAGS "-Wno-error=shadow -Wno-error=old-style-cast -Wno-error=switch-enum -Wno-error=switch")
# set_source_files_properties(${FILENAME} PROPERTIES COMPILE_FLAGS "-Wno-error=float-equal -Wno-error=global-constructors")
-
+
# if ("${CLANG_VERSION}" VERSION_GREATER 3.0)
# # flags that are not present in 3.0
# set_source_files_properties(${FILENAME} PROPERTIES COMPILE_FLAGS "-Wno-error=covered-switch-default ")
@@ -286,4 +289,3 @@ endmacro()
# endif()
# endforeach()
# endif()
-